package cn.icatw.gulimall.order.config;

import cn.icatw.gulimall.order.interceptor.LoginUserInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 订单网络配置
 *
 * @author icatw
 * @date 2022/3/25
 * @email 762188827@qq.com
 * @apiNote
 */
@Configuration
public class OrderWebConfig implements WebMvcConfigurer {
    @Autowired
    LoginUserInterceptor loginUserInterceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        //TODO 后台放行
        registry.addInterceptor(loginUserInterceptor).addPathPatterns("/**");
    }
}
